<script type="text/javascript">
// Using jQuery.

$(function() {
    $('form').each(function() {
        $(this).find('input').keypress(function(e) {
            // Enter pressed?
            if(e.which == 10 || e.which == 13) {
                this.form.submit();
            }
        });
    });
});
</script>

<div class="acard-content">
    <div class="content-info" style="margin-bottom: 70px;">
        <div class="checkout-login">
              <% unless flash[:alert].blank? %>
                <% errors = Array.new %>
                <% errors << ['login','El usuario y/o contraseña ingresados son inválidos.'] %>
                <%= render :partial => 'shared/error_messages', :locals => { :errors => errors } %>
              <% end %>

            <h3>ACCEDA A SU CUENTA</h3>
            <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>

              <p><%= f.label :login, 'Usuario' %></p>
              <%= f.text_field :login %><br><br>

              <p><%= f.label :password, 'Contraseña' %></p>
              <%= f.password_field :password %><br><br>

              <a class="login" id="submit-trigger" onclick="$(this).parents('form').submit();" href="#">Ingresar</a>
            <% end %>

        </div>


    </div>
</div>



<%#= render :partial => "devise/shared/links" %>